function getComponent() {
    // 可以使用 webpackChunkName 来自定义提取出去的文件名称
    return import(/* webpackChunkName: "lodash" */ "lodash")
      .then(({ default: _ }) => {
        const element = document.createElement("div");
  
        element.innerHTML = _.join(["Hello", "webpack"], " ");
  
        return element;
      })
      .catch((error) => "An error occurred while loading the component");
  }
  
  getComponent().then((component) => {
    document.body.appendChild(component);
  });